/**
 * 封装在query 上的工具类 ,js判断是否存在权限
 * 
 */
;
(function($) {
	//转变成数组
	var permissionArr = new Array();
	if(permissions){
		permissionArr = permissions.split(",");
//		console.log(permissionArr);
	}
	$.extend({
		shiro:{
			hasPermission:function(permission){
			    var i = 0, length = permissionArr && permissionArr.length;
			    for (; i < length; i++) if (permissionArr[i] === permission) return true;
			    return false;
			}
		}
	});
})(jQuery, undefined);
